package com.daffodil.flowable.entity;

import java.util.Date;

import org.flowable.engine.repository.Deployment;

import com.daffodil.core.entity.BaseEntity;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 流程部署信息
 * @author yweijian
 * @date 2021年11月16日
 * @version 1.0
 * @description
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ActCnDeployment extends BaseEntity<String> {
    
    private static final long serialVersionUID = 4206676276665328850L;

    private String id;
    
    /** 流程部署ID */
    private String deployId;

    /** 流程名称 */
    private String modelName;

    /** 流程类型 */
    private String category;
    
    /** 流程标识 */
    private String modelKey;

    /** 部署时间 */
    private Date deployTime;
    
    /** 流程类型编号(租户ID) */
    private String tenantId;

    public ActCnDeployment() {
        super();
    }

    public ActCnDeployment(Deployment deployment) {
        this.id = deployment.getId();
        this.deployId = deployment.getId();
        this.modelName = deployment.getName();
        this.category = deployment.getCategory();
        this.modelKey = deployment.getKey();
        this.deployTime = deployment.getDeploymentTime();
        this.tenantId = deployment.getTenantId();
    }

}
